//
//  YHInputTextAlertView.m
//  AddressBookCloud
//
//  Created by 林宁宁 on 2020/5/13.
//  Copyright © 2020 林宁宁. All rights reserved.
//

#import "YHInputTextAlertView.h"
#import "NSObject+Keyboard.h"
#import "UIView+YHInputAccessory.h"
#import "UIFont+YH.h"
#import "YHDefines.h"
#import "YHConstant.h"
#import "UIColor+YHStyle.h"
#import "YHDeviceInfo.h"

@implementation YHInputTextAlertView


- (void)buildOtherContentV{
    
    self.contentWidth = [YHDeviceInfo s_width]*0.8;
    self.headTitleAligment = NSTextAlignmentCenter;
    self.titleToTopSpace = Adapted(20);
    self.titleToContentSpace = Adapted(15);
    self.contentToButtonSpace = Adapted(10);
    
    self.textView = [[UITextView alloc] initWithFrame:CGRectMake(0, 200, 200, [YHDeviceInfo s_height] *0.3)];
    self.textView.textAlignment = NSTextAlignmentLeft;
    self.textView.font = [UIFont yh_pflOfSize:14];
    self.textView.textColor = [UIColor yh_h1];
    self.textView.backgroundColor = [UIColor yh_background];
    self.textView.keyboardAppearance = UIKeyboardAppearanceDark;
    self.textView.textContainerInset = UIEdgeInsetsMake(5, 10, 5, 10);
    [self.textView showAccessoryDown:nil];
    [self addCustomView:self.textView];

    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        
        [self yh_keyboardShowAtAnimationView:self.contentView];
        
        [self.textView becomeFirstResponder];
        
    });
}

@end
